home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_lavaambient.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  54 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_LavaAmbient.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     entered
  13.     
  14.     thing       ambientPos
  15.     
  16.     sector      stopAmbients
  17.     sector      startAmbients
  18.  
  19.     sound       sndLava=gen_lava_flow_a.wav     local
  20.     
  21.     int         looping     local
  22.     int         soundsOn=0  local
  23.     
  24.     flex        vol=0.5
  25.     flex        min=8.0
  26.     flex        max=12.0
  27.     
  28. end
  29.  
  30. # ========================================================================================
  31.  
  32. code
  33.  
  34. entered:
  35.  
  36.     if((GetSenderRef() == startAmbients) && (soundsOn == 0))
  37.     {
  38.         soundsOn = 1;
  39.         looping = PlaySoundThing(sndLava, ambientPos, vol, min, max, 0x0001);
  40.     }
  41.  
  42.     if((GetSenderRef() == stopAmbients) && (soundsOn == 1))
  43.     {
  44.         soundsOn = 0;
  45.         StopSound(looping, 0.0);
  46.     }
  47.     
  48.     return;
  49.  
  50. # ========================================================================================
  51.  
  52. end
  53.  
  54.